Skip to main content

logging system manager

๐Ÿ“˜ Feature description - Error system managerโ€‹

  • ๐Ÿ’ป Error system management (server and client website) ๐Ÿ›ซ 2023-11-05 ๐Ÿ“… 2023-11-12 โœ… 2023-11-12
    • Pushing errors from client โœ… 2023-11-06
    • Database rules for granting access to read and write โœ… 2023-11-06
    • Creating a feature flag to easily activate or deactivate this error system manager โœ… 2023-11-09
    • Finish with testing the firestore rules โœ… 2023-11-12
  • ๐Ÿ’ป Error system management (logs website) ๐Ÿ›ซ 2023-11-05 ๐Ÿ“… 2023-11-12 โœ… 2023-11-12
    • Cleaning website โœ… 2023-11-07
    • Creating a table and fulfill it with all the errors in the errors collection โœ… 2023-11-07
    • Only user with role admin should be able to access this website โœ… 2023-11-07
    • Enable/disable the feature flag from the logs website โœ… 2023-11-09

๐Ÿ“– Scenarios:โ€‹

โœ (0) Server error managerโ€‹

Given a user is doing any action

When an error is generated

Then send a notification to the error system management

0004 - diagram - system error management.excalidraw.dark

The name of the document will be [2023_11_06_ErrorType]

The notification is stored in a collection called errors where each document will contain:

export type BusinessError = {
ย  ย  // User
ย  ย  user_uid?: string;

ย  ย  // Error
ย  ย  error_name: string;
ย  ย  error_message: string;
ย  ย  error_timestamp?: string;
ย  ย  error_stack?: string;
}

The collection errors should be with the next permissions:

  • write permission - everybody
  • read permission - nobody

This error system manager will be used in very critical situations like for example:

export const SmartContractError = createErrorFactory("SmartContractError");
export const SubscriptionError = createErrorFactory("SubscriptionError");
export const LoginError = createErrorFactory("LoginError");

โœ (1) Website error managerโ€‹

Given I am authenticated user with a specific email accepted by the project

When I log in to a new website called `full-stack-template-errors`

Then I can see a table describing all the errors that were sent from the client